package net.sf.nlp.ltag.data;


public class Operator {
	private LTAGTree tree1;
	private LTAGTree tree2;
	
	private String operator;
	private LTAGNode tree1Node;
	
	public Operator(LTAGTree tree1, LTAGTree tree2, String operator, LTAGNode tree1Node)
	{
		this.tree1 = tree1;
		this.tree2 = tree2;
		this.operator = operator;
		this.tree1Node = tree1Node;
	}
	
	public LTAGTree getTree1() {
		return tree1;
	}
	public void setTree1(LTAGTree tree1) {
		this.tree1 = tree1;
	}
	public LTAGTree getTree2() {
		return tree2;
	}
	public void setTree2(LTAGTree tree2) {
		this.tree2 = tree2;
	}
	public String getOperator() {
		return operator;
	}
	public void setOperator(String operator) {
		this.operator = operator;
	}
	public LTAGNode getTree1Node() {
		return tree1Node;
	}
	public void setTree1Node(LTAGNode tree1Node) {
		this.tree1Node = tree1Node;
	}
	
	public String toString()
	{
		StringBuffer sb = new StringBuffer();
		
		sb.append(tree1.getId());
		sb.append(" ").append(operator);
		sb.append(tree2.getId());
		sb.append(" at node:").append(tree1Node.getNodeText());
		
		return sb.toString();
	}
	/*
	public boolean equals(Operator op)
	{
		if (this.tree1 != op.getTree1())
			return false;
		
		if (this.tree2 != op.getTree2())
			return false;
		
		if (!this.operator.equals(op.getOperator()))
			return false;
		
		if (this.getTree1Node() != op.getTree1Node())
			return false;
		
		return true;
	}*/
}
